# coding=utf-8
from django.conf.urls import patterns, include, url
from django.views.generic.base import TemplateView

from feeds import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'donutscheduler.views.home', name='home'),
    # url(r'^donutscheduler/', include('donutscheduler.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),

    #home, laedt template
    #alt -> url(r'^$', TemplateView.as_view(template_name='index.html')),
    url(r'^$', 'donutscheduler.views.home', name='home'),

    url(r'^impressum/$', 'donutscheduler.views.impressum'),
    url(r"^login/$", "donutscheduler.views.userlogin"),
    url(r"^logout/$", "donutscheduler.views.userlogout"),
    url(r"^register/$", "donutscheduler.views.register"),
    url(r"^addEvent/$", "donutscheduler.views.addEvent"),
    url(r'^deleteLesson/$', 'donutscheduler.views.deleteLesson'),
    url(r'^deleteTimetable/$', 'donutscheduler.views.deleteTimetable'),
    url(r'^deleteEvent/$', 'donutscheduler.views.deleteEvent'),


    url(r'^account/about/$', 'donutscheduler.views.overview'),
    url(r'^account/timetables/$', 'donutscheduler.views.timetables'),
    url(r'^account/events/$', 'donutscheduler.views.events'),
    url(r'^account/settings/$', 'donutscheduler.views.settings'),

	url(r'^account/addTimetable/$', 'donutscheduler.views.addTimetable'), #unnotig da kein direkter zugriff?!
	url(r'^account/addLesson/$', 'donutscheduler.views.addLesson'),

    url(r'^account/addSubject/$', 'donutscheduler.views.addSubjectLesson'), #Alte ADDMethode
    url(r'^account/addSubjectLesson/$', 'donutscheduler.views.addSL'), #JavaScript
	url(r'^account/getProfessor/(?P<timetableId>[0-9]+)', 'donutscheduler.views.getProfessor'),
	url(u'^account/getSubject/(?P<timetableId>[0-9]+)/(?P<professor>([äöüa-zÄÖÜA-Z0-9.-]+\s?)+)', 'donutscheduler.views.getSubject'),

    #Feeds
    url(r'^eventfeed/(?P<user_name>[\w]+)(?P<user_id>[\w]+)',EventFeed()),
)
